<?php
class detailModel extends Model {
	
	public function _list($map,$sort='sort',$pagesize=20){
		//计算总页数
		$count=$this->where($map)->count();
		//实例化分页类
		import ( 'ORG.Util.Page' );
		$p=new Page($count,$pagesize);
		$list = $this->where($map)->order($sort)->limit($p->firstRow.',
'.$p->listRows)->select();
        //$goods = $this->where('')
        $pages=$p->show();
		
		$data['list']=$list;
		$data['pages']=$pages;
		return $data;
	}

}

?>